<template>
<div :class="{home:isBack,homeNoBack:!isBack}">
  <search></search>
  <div class="paddingTop"></div>
  <swiper :home-swiper="homeSwiper"></swiper>
  <goods-list :goods-list="goodsList"></goods-list>
  <div class="blank"></div>

  <tabbar></tabbar>
</div>
</template>

<script>
import {homeSwiper,goodsList} from "@/data/home";

// import {getHomeData} from "@/network/home";
import Tabbar from "@/components/tabbar/tabbar";
import Search from "./components/search";
import Swiper from "./components/swiper";
import GoodsList from "./components/goodsList";

export default {
name: "index",
  components: {GoodsList, Swiper, Search, Tabbar},
  data(){
  return{
    homeSwiper,
    goodsList,
    testImg:null,
    isBack:false,
  }
  },
  // created() {
  //   getHomeData().then(res=>{
  //     this.homeSwiper=res.data.homeSwiper;
  //     this.goodsList=res.data.goodsList;
  //   });
  // }

}
</script>

<style scoped>
.home{
  /*background: url("../../assets/img/homeBack.jpg") no-repeat;*/
  background-size: cover;
}
.homeNoBack{
  background-color: #F4F4F4;
  width: 100vw;
  min-height:100vh ;
}
.paddingTop{
  padding-top: 1.5rem;
}
</style>